import instance from "@/axios";

// 获取角色列表
export const roleList = ()=>instance.get('/role/list')

// 分页查询
export const rolePage = (searchForm)=>instance.post('/role/page',searchForm)

// 新增，修改
export const saveOrUpdate = (role) =>instance.post('/role/addOrUpdate',role)

// 根据id 查询角色信息
export const getRoleById = (id) =>instance.get('/role/getById/'+id);


//删除角色信息
export const deleteRole = (id) =>instance.delete('/role/delete/'+id);


// 分配权限
export const addRoleAuth = (roleAuth) =>instance.post('/role/addRoleAuth/',roleAuth);


// 根据id获取角色权限
export const getRoleAuth = (roleId) =>instance.get('/role/roleAuth/'+roleId);
